/**This class combines two SmallDocuments(SDs)into 1 SD
 * 
 */

/**
 * @author u0907023
 *
 */
public class Combine extends Command{

	private SmallDocument topSD;
	private SmallDocument bottomSD;
	private int totalLines;
	
	public Combine(Stylepad editor, SmallDocument topSD, SmallDocument bottomSD, int totalLines) {
		
		this.editor = editor;
		this.topSD = topSD;
		this.bottomSD = bottomSD;
		this.totalLines = totalLines;
			
	}

	@Override
	public void process() {

		topSD.numberOfParas = topSD.numberOfParas + bottomSD.numberOfParas;

		topSD.docName = SDAction.updateLineNoInFileName(topSD.docName, totalLines);

	}
		
		

}
